/*
 * app_cli_arguments.h
 *
 *  Created on: 2023年6月29日
 *      Author: HXF
 */

#ifndef APP_CLI_ARGUMENTS_H_
#define APP_CLI_ARGUMENTS_H_

#include <app_cli_config.h>
#include "error_code.h"

/// @brief UINT8 argument type
#define DS_CLI_ARG_UINT8      (0x00U)
/// @brief UINT16 argument type
#define DS_CLI_ARG_UINT16     (0x01U)
/// @brief UINT32 argument type
#define DS_CLI_ARG_UINT32     (0x02U)
/// @brief INT8 argument type
#define DS_CLI_ARG_INT8       (0x03U)
/// @brief INT16 argument type
#define DS_CLI_ARG_INT16      (0x04U)
/// @brief INT32 argument type
#define DS_CLI_ARG_INT32      (0x05U)
/// @brief STRING argument type
#define DS_CLI_ARG_STRING     (0x06U)
/// @brief HEX argument type
#define DS_CLI_ARG_HEX        (0x07U)
/// @brief Optional UINT8 argument type
#define DS_CLI_ARG_UINT8OPT   (0x10U)
/// @brief Optional UINT16 argument type
#define DS_CLI_ARG_UINT16OPT  (0x11U)
/// @brief Optional UINT32 argument type
#define DS_CLI_ARG_UINT32OPT  (0x12U)
/// @brief Optional INT8 argument type
#define DS_CLI_ARG_INT8OPT    (0x13U)
/// @brief Optional INT16 argument type
#define DS_CLI_ARG_INT16OPT   (0x14U)
/// @brief Optional INT32 argument type
#define DS_CLI_ARG_INT32OPT   (0x15U)
/// @brief Optional STRING argument type
#define DS_CLI_ARG_STRINGOPT  (0x16U)
/// @brief Optional HEX argument type
#define DS_CLI_ARG_HEXOPT     (0x17U)
/// @brief ADDITIONAL argument type
#define DS_CLI_ARG_ADDITIONAL (0x20U)
/// @brief WILDCARD argument type
#define DS_CLI_ARG_WILDCARD   (0x21U)
/// @brief END argument type
#define DS_CLI_ARG_END        (0xFFU)

int DS_cli_arguments_convert_multiple(const ds_cli_argument_type_t *arg_type_list,
                                               const int token_c,
                                               char *token_v[],
                                               int arg_ofs,
                                               void *argv[],
                                               uint32_t *memory_array);

#endif /* APP_CLI_ARGUMENTS_H_ */
